using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ATH_AttachementMap : EntityTypeConfiguration<ATH_Attachement>
    {
        public ATH_AttachementMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.RecordType1)
                .HasMaxLength(30);

            this.Property(t => t.RecordType2)
                .HasMaxLength(30);

            this.Property(t => t.RecordID1)
                .HasMaxLength(30);

            this.Property(t => t.RecordID2)
                .HasMaxLength(30);

            // Table & Column Mappings
            this.ToTable("ATH_Attachement");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.RecordType1).HasColumnName("RecordType1");
            this.Property(t => t.RecordType2).HasColumnName("RecordType2");
            this.Property(t => t.RecordID1).HasColumnName("RecordID1");
            this.Property(t => t.RecordID2).HasColumnName("RecordID2");
            this.Property(t => t.CreatedOn).HasColumnName("CreatedOn");
            this.Property(t => t.CreatedBy).HasColumnName("CreatedBy");
        }
    }
}
